#pragma once
#include "xKernel/IxLayoutManager.h"

[
    default(IxLayoutManager),
    threading(free),
    uuid("BED705AF-B704-44f5-BED8-8E3D7076C9D8"),
    coclass
]
class ATL_NO_VTABLE CxLayoutManager : public IxLayoutManager
{
    typedef std::map<INT, CComPtr<IxLayout> > LAYOUTMAP;

public:
    CxLayoutManager();
    virtual ~CxLayoutManager();

public:
    // interface of IxLayoutManager
    HRESULT GetLayout(INT nType, IxLayout** ppLayout);
    HRESULT Register(IxLayout* pLayout, LPINT pnType);
    HRESULT Unregister(IxLayout* pLayout, INT nType);

protected:
    LAYOUTMAP   m_mapLayout;
    INT         m_nIndex;
};